﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PhotoMgr.src.common
{
    /// <summary>
    /// ActionDetail define all permission actions for detail form
    /// </summary>
    public class FormAction
    {
        public FormAction(bool AllAction)
        {
            this.EditRecord = AllAction;
            this.AddRecord = AllAction;
            this.DisposeRecord = AllAction;
            this.ConfirmRecord = AllAction;
            this.ViewRecord = AllAction;
            this.SelectRecord = AllAction;
        }

        /// <summary>
        /// For look up perpose only
        /// </summary>
        public FormAction()
        {
            this.EditRecord = false;
            this.AddRecord = false;
            this.DisposeRecord = false;
            this.ConfirmRecord = false;
            this.ViewRecord = false;
            this.SelectRecord = true;
        }

        public FormAction(bool EditRecord, bool ViewRecord, bool AddRecord, bool DisposeRecord, bool ConfirmRecord, bool SelectRecord)
        {
            this.EditRecord = EditRecord;
            this.AddRecord = AddRecord;
            this.DisposeRecord = DisposeRecord;
            this.ConfirmRecord = ConfirmRecord;
            this.ViewRecord = ViewRecord;
            this.SelectRecord = SelectRecord;
        }

        public FormAction(bool EditRecord, bool ViewRecord, bool AddRecord, bool DisposeRecord, bool ConfirmRecord, bool SelectRecord, bool ViewRecordOwner, bool EditRecordOwner, bool DisposeRecordOwner, bool ConfirmRecordOwner)
        {
            this.EditRecord = EditRecord;
            this.AddRecord = AddRecord;
            this.DisposeRecord = DisposeRecord;
            this.ConfirmRecord = ConfirmRecord;
            this.ViewRecord = ViewRecord;
            this.SelectRecord = SelectRecord;
            this.ViewRecordOwner = ViewRecordOwner;
            this.EditRecordOwner = EditRecordOwner;
            this.DisposeRecordOwner = DisposeRecordOwner;
            this.ConfirmRecordOwner = ConfirmRecordOwner;
        }

        public bool EditRecord { get; set; }

        public bool EditRecordOwner { get; set; }

        public bool ViewRecord { get; set; }

        public bool ViewRecordOwner { get; set; }

        public bool AddRecord { get; set; }

        public bool DisposeRecord { get; set; }

        public bool DisposeRecordOwner { get; set; }

        public bool ConfirmRecord { get; set; }

        public bool ConfirmRecordOwner { get; set; }

        public bool SelectRecord { get; set; }
    }
}
